Carbon


GetThreadState

Header: Threads.h Carbon status: Supported

Obtains the state of a thread.

OSErr GetThreadState (
    ThreadID threadToGet, 
    ThreadState *threadState
);
threadToGet

The thread ID of the thread about which you want information.

threadState

On return, a pointer to the state of the thread specified by threadToGet.

function result

A result code.

DISCUSSION

A thread can be in one of three states: ready to execute (kThreadReadyState), stopped (kStoppedThreadState), or executing (kRunningThreadState).

To change the state of a specified thread, use SetThreadState.

AVAILABILITY

Supported in Carbon. Available in CarbonLib 1.0 and later when ThreadsLib 1.0 or later is installed. Exported by CarbonLib 1.0 and later and by ThreadsLib 1.0 and later.


© 2000 Apple Computer, Inc. — (Last Updated 3/8/2000)